package com.cn.qtms.entity;//类注释设置模板

import com.cn.qtms.base.entity.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.math.BigDecimal;

/**
 * @Name:TmOrder
 * @Description:
 * @Author: zhangyang
 * @Date: 2019-11-21 17:19
 **/
@Entity
@Table(name = "tm_order")
@org.hibernate.annotations.Table(appliesTo = "tm_order",comment="订单信息表")
@Getter
@Setter
public class TmOrder extends BaseEntity {

    /**
     * 订单号
     */
    @Column(name = "order_no",unique = true,length = 50)
    private String orderNo;

    @Column(name = "status", columnDefinition = "char(1) default '0' COMMENT '状态:0 已取消1已下单2已支付3已完成'")
    private String status;

    @Column(name = "order_benefit_id", columnDefinition = "bigint(20) comment '权益ID'")
    @ApiModelProperty(value = "权益ID")
    private Long orderBenefitId;

    @Column(name = "stock_code", columnDefinition = "varchar(50) COMMENT '批次号'")
    private String stockCode;

    @Column(name = "total_price", columnDefinition = "decimal(9,2) COMMENT '总价'")
    private BigDecimal totalPrice;

    @Column(name = "user_id", columnDefinition = "bigint(20) comment '用户id'")
    @ApiModelProperty(value = "用户id")
    private Long userId;

}
